<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/templates/modeloSistema.xhtml"
	xmlns:stella="http://stella.caelum.com.br/faces2">

	<ui:define name="menu">
		<ui:include src="/includes/menuPrincipal.xhtml" />
	</ui:define>

	<ui:define name="conteudo">

RELATÓRIO DE CLIENTES
<br />
		<br />
		<br />
		
		<f:event listener="#{MBCliente.prepararNovo}" type="preRenderView"/>
		<h:form prependId="false" id="frmCliRel">


			<h:panelGrid columns="2" id="pnlCliRel">
				<p:outputLabel value="Selecione uma cidade:" />
				<p:selectOneMenu id="cidade5" value="#{RelatorioMB.id}"
					filter="true" required="true"
					requiredMessage="Campo cidade obrigatório">
					<f:selectItem itemValue="" itemLabel="Selecione uma Cidade" />
					<f:selectItem itemValue="0" itemLabel="Todas" />
					<f:selectItems value="#{MBCliente.listaCidade}" var="item"
						itemValue="#{item.codCidade}" itemLabel="#{item.nome}" />
				</p:selectOneMenu>

				<p:outputLabel for="calendario" value="Data Alteração: " />
				<p:calendar id="calendario" required="true"
					validatorMessage="Campo Obrigatório" pattern="dd/MM/yyyy"
					mask="true" value="#{RelatorioMB.dataAlteracao}" showOn="button">

				</p:calendar>
			</h:panelGrid>


			<h:panelGrid columns="3">
				<p:commandButton value="Gerar Relatório" icon="ui-icon-print"
					ajax="false" actionListener="#{RelatorioMB.relatorioParametro()}"
					onclick="PF('dlgRel').hide();" />

				<p:commandButton value="Cancelar" onclick="PF('dlgRel').hide();"
					process="@this">
					<p:resetInput target="pnlCliRel" />
				</p:commandButton>

				<p:button value="Voltar" outcome="/pages/principal.xhtml" />

			</h:panelGrid>
		</h:form>

	</ui:define>
</ui:composition>